package com.song.provider.controller;

import com.song.provider.pojo.Orders;
import com.song.provider.service.OrderService;
import jakarta.annotation.Resource;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @Author 宋伟宁
 * @Date 2024/1/9
 * @Version 1.0
 **/
@RestController
public class OrdersController {

    @Resource
    private OrderService orderService;
    @Value("${server.port}")
    private String port;

    @PostMapping("/pay")
    public boolean pay(@RequestBody Orders orders){
        int m = 3/0;
        return this.orderService.createOrders(orders);
    }

}
